
import '../../http/entity/base_response.dart';
import '../../models/upgrade_model.dart';

class EntityFactory {
  static T? convertOBJ<T>(Map<String, dynamic>? data) {
    if (data == null) {
      return null;
    }
    switch (T.toString()) {
      case 'UpgradeModel?':
      case 'UpgradeModel':
        return UpgradeModel.fromJson(data) as T;
      default:
        return data as T;
    }
  }
}
